Numerical simulation is widely used in industrial fields as a method of simulating a physical system by using a computer. In most cases, there is desire to model the transport processes occurring in the physical system. What is being transported is typically mass, energy, momentum, or some combination thereof. By using numerical simulation, it. is possible to model and observe a physical phenomenon and to determine design parameters, without actual laboratory experiments and field tests.
Reservoir simulation is of great interest because it infers the behavior of a real hydrocarbon-bearing reservoir from the performance of a model of that reservoir. The typical objective of reservoir simulation is to understand the complex chemical, physical, and fluid flow processes occurring in the reservoir sufficiently well to predict future behavior of the reservoir to maximize hydrocarbon recovery. Reservoir simulation often refers to the hydrodynamics of flow within a reservoir, but in a larger sense reservoir simulation can also refer to the total hydrocarbon system which can include not only the reservoir, but also injection wells, production wells, surface flowlines, associated aquifers, and surface processing facilities. Reservoir simulation calculations in such hydrocarbon systems are based on fluid flow through the entire hydrocarbon system being simulated. These calculations are performed with varying degrees of rigor, depending on the requirements of the particular simulation study and the capabilities of the simulation software being used.
The principle of numerical simulation is to numerically solve equations describing a physical phenomenon using a computer. Such equations are generally ordinary differential equations and partial differential equations. As a means for numerically solving such equations, there are known the finite element method, the finite difference method, the finite volume method, and the like. Regardless of which method is used, the physical system to be modeled is divided into cells (a set of which is called a grid or mesh), and the state variables that vary in space throughout the model are represented by sets of values for each cell. The reservoir rock properties such as porosity and permeability are typically assumed to be constant inside a cell. Other variables such as fluid pressure and phase saturation are specified at specified points, sometimes called nodes, within the cell. A link between two nodes is called a “connection.” Fluid flow between two cells is typically modeled as flow along the connection between them.
Since the reservoir simulation can include vastly different fluid flow environments (e.g., porous rock, well tubing, processing facilities), the set of cells can include multiple segments of different flow enviroments. Although individual segments, such as production facilities and surface pipe segments, could be represented by single cells, at times reservoir simulation programs subdivide such segments into multiple cells.
A set of equations is developed to express the fundamental principles of conservation of mass, energy, and/or momentum within each cell and of movement of mass, energy, and/or momentum between cells. These equations can number in the millions. The replacement of state variables that vary in space throughout a model by a finite number of variable values for each cell is called “discretization”. In order to analyze a phenomenon changing in time, it is necessary to calculate physical quantities at discrete intervals of time called timesteps, irrespective of the continuously changing conditions as a function of time. Time-dependent modeling of the transport processes therefore proceeds in a sequence of timesteps.
During a timestep, transport of various kinds occurs between cells. Through this transport, a cell can exchange mass, momentum, or energy with other nearby cells. In the porous medium of a subterranean reservoir, mass and momentum transport are computed using Darcy's law. In production tubing in a wellbore, mass and momentum transport calculations can be performed using well known methods to describe multiphase turbulent flow. Energy can be convected in the moving fluids, and it can be conducted through the reservoir rock. In some cases, energy transport by radiation is also considered. It is also sometimes desirable to consider chemical reactions that lead to creation or consumption of mass and energy in a cell during a timestep.
The equations governing the behavior of each cell during a timestep couple the mass, momentum, and energy conservation principles to the transport calculations. These equations can assume either an unsteady state or a pseudo-steady state transport process. If they assume an unsteady state process, a conservation principle can be expressed as
Amount=Amount in+Net amount+Net amountin cell atcell attransportedcreated inend ofbeginninginto cellcell duringtimestepofduringtimesteptimesteptimestepIf pseudo-steady state is assumed, the conservation principle can be expressed as
Net amount+Net=0transportedamountinto cellcreated induringcell duringtimesteptimestepAt every timestep, the simulator must solve one or more large matrix equations, with the number depending on the type of timestep computation method being used. Because matrix equations are quite large (at least one equation per cell), they are solved iteratively except in small models.
Various timestep computations have been proposed for reservoir simulation. Two commonly used calculation methods are called “IMPES” and “fully implicit.” In the IMPES method, which is derived from the term “implicit-pressure, explicit-saturation,” flows between neighboring cells are computed based on pressures at their values at the end of the timestep and saturations at their values at the beginning of the timestep. The pressures at the end of the IMPES timestep are interdependent and must be determined simultaneously. This method is called “implicit” because each pressure depends on other quantities (for example, other pressures at the end of the timestep) that are known only implicitly. The basic procedure is to form a matrix equation that is implicit in pressures only, solve this matrix equation for the pressures, and then use these pressures in computing saturations explicitly cell by cell. In this fashion, after the pressures have been advanced in time, the saturations are updated explicitly. After the saturations are calculated, new relative permeabilities and capillary pressures can be calculated; these are explicitly used at the next timestep. Similar treatment can be used for other possible solution variables such as concentrations, component masses, temperature, or internal energy.
The fully implicit method trets both pressure and saturations implicitly. Flow rates are computed using phase pressures and saturations at the end of each timestep. The calculation of flow rates, pressure, and saturation involves the solution of nonlinear equations using a suitable iterative technique. At each iteration, the method constructs and solves a matrix equation, the unknowns of which (pressure and saturation) change over the iteration. As the pressures and saturations are solved, the updating of these terms continues using new values of pressure and saturation. The iteration process terminates when predetermined convergence criteria are satisfied.
IMPES consumes relatively little computer time per timestep, but in some simulations its stability limitations cause it to use a large number of small timesteps. The result can be a large computing cost. The fully implicit method consumes more computing time than IMPES per timestep, but it can take much larger timesteps.
In many reservoir simulations, implicit computations are needed for only a small percentage of cells. Simulation programs have been proposed to perform both IMPES and fully implicit calculations. This makes it possible to use the fully implicit method's long timesteps while decreasing the computational cost per timestep.
Additional information about reservoir simulation and computation techniques can be found in:                (1) U.S. patent application Ser. No. 60/074188 by J. W. Watts, entitled “Improved Process for Predicting Behavior of a Subterranean Formation”;        (2) Mattax, C. C. and Dalton, R L., Reservoir Simulation, Monograph Volume 13, Society of Petroleum Engineers, 1990;        (3) Aziz, K. and Settari, A., Petroleum Reservoir Simulation, Applied Science Publishers Ltd, Barking, Essex, England, 1979;        (4) D. W. Peaceman, “Fundamentals of Numerical Reservoir Simulation,” Elsevier, N.Y., 1977;        (5) J. W. Watts, “Reservoir Simulation: Past, Present, and Future,” SPE 38441 presented at the 1997 SPE Reservoir Simulation Symposium, Dallas, Tex., 8-11 Jun. 1997; and        (6) K. T. Lim, D. J. Schiozer, K Aziz, “A New Approach for Residual and Jacobian Array Construction in Reservoir Simulators,” SPE 28248 presented at the 1994 SPE Petroleum Computer Conference, Dallas, Tex., Jul. 31-Aug. 3, 1994.        
Efforts have been made to perform widely varying reservoir simulation methods in a single computer code. However, such “general-purpose” simulation systems are very complex, largely because they are designed to have one or more of the following capabilities:                (1) represent many different types of cells (e.g., different domains of a reservoir, well tubing, and surface gathering and distribution facilities, and surface processing facilities);        (2) use different timestep computation methods (e.g., IMPES, fully implicit, sequential implicit, adaptive implicit, and/or cascade methods);        (3) use different ways of representing reservoir fluids;        (4) use multiple ways of computing transport between cells;        (5) perform what is called a “black-oil model,” which treats the hydrocarbons as being made up of two components, and also having the capability of performing compositional representations in which the hydrocarbons are assumed to contain compounds such as methane, ethane, propane, and heavier hydrocarbons;        (6) simulate steam injection or in situ combustion processes, which must take into account temperature changes as a function of time which require an energy balance and related calculations;        (7) simulate miscible recovery processes using special fluid properties and transport calculations;        (8) simulate hydrocarbon recovery processes that take into account injection of surfactants, polymers, or other chemicals and the flow of these fluids into the reservoir;        (9) simulate injection of chemicals that react with each other, the reservoir hydrocarbons, or the reservoir rock; and        (10) simulate migration of hydrocarbons and geologic deposition over geologic time.        
Most reservoir simulators use so-called structured grids in which the cells are assumed to be three dimensional rectangular shapes distorted to conform as well as possible to geological features and flow patterns. Certain geological features and modeling situations cannot be represented well by structured grids. This shortcoming can be overcome in part by using local refinement, in which selected cells are subdivided into smaller cells, and non-neighbor connections, which allow flow between cells that are physically adjacent to each other but are not adjacent in the data structure. A more powerful solution to this problem is to exploit the flexibility provided by a totally unstructured grid. This requires reorganizing the way the simulation program stores its data and performs its computations.
Because general-purpose computing in reservoir simulation can require substantial computing resources, proposals have been made to subdivide a simulation model into smaller segments and to perform computations in parallel on multiple-processor computers. The principal attraction of parallel computing is the ability to reduce the elapsed time of a simulation, ideally by a factor of n for an n-processor computer. Parallel computing falls short of the ideal because of several factors, including recursion in linear equation solution, the overhead associated with message passing. required for various computations, and load imbalances due to heterogeneities in the problem physics and characterization of the hydrocarbon fluids.
General-purpose simulation programs developed in the past use regular, structured cells having a variety of connection and cell types. These simulation programs have treated these connection and cell types in different ways, resulting in unsystematic methodologies and complex code. When local refinement, non-neighbor connections, and parallel computing capabilities are added to such programs, they can become extremely complex and difficult to use. Such programs tend to be inefficient and unreliable.
There is a continuing need in the industry for a reservoir simulation program that can perform widely varying types of simulation calculations using an unstructured grid on parallel computers. As a result, there is a need for a method that orgies and implements the simulation calculations in a way that minimizes complexities while providing computational efficiency.